//
//  ViewController.swift
//  WatchExample
//
//  Created by Longxiang Guo (QXQ4633) on 2021/6/14.
//

import UIKit

class ViewController: UIViewController {

    override func viewDidLoad() {
        super.viewDidLoad()
         
    }
    
    override func touchesBegan(_ touches: Set<UITouch>, with event: UIEvent?) {
        UIApplication.shared.isIdleTimerDisabled = true;
        let application = UIApplication.shared;
        print(application)
//        exit(0);
       // thread_suspend(<#T##target_act: thread_act_t##thread_act_t#>)
       //Thread.current.start()
         
        //task_suspend(<#T##target_task: task_t##task_t#>)
//        Progress.current()?.pause();
//        UIApplication.shared
//        Progress.current()?.resignCurrent()
       // thread_suspend( SYS_pid_suspend)
      //  SYS_pid_suspend;
        SYS_exit
        // exit(SYS_pid_suspend)
        //https://stackoverflow.com/questions/5360846/suspend-the-application
        UIApplication.shared.perform(#selector(ViewController.suspend))
    }
    
    @objc static func suspend(){}

    

}

